/*
 * StateManager.cpp
 *
 *  Created on: 29-06-2013
 *      Author: Jarek
 */

#include "StateManager.h"
#include "Stack.h"
#include "MainMenu.h"

StateManager::StateManager() :
	states		(STACK_SIZE)
{
	stateType = STATE_NONE;
}

StateManager::~StateManager()
{
	states.clear();
}

bool StateManager::onInitialize()
{
	states.push(new MainMenu());
	return states.top()->onInitialize();
}

void StateManager::onDestroy()
{
	states.clear();
}

void StateManager::onRun(const Time& time)
{
	states.top()->onRun(time);
}

void StateManager::onDraw(const Time& time)
{
	states.top()->onDraw(time);
}

bool StateManager::handleInput(const Time& time)
{
	//TODO: INPUT!!!!!
	return false;
}
void StateManager::changeState()
{

}

void StateManager::changeState(STATE_TYPE nextState)
{

}



